Same page works differently on two different servers.

Same page works differently on two different servers.

am 21.12.2007 20:15:03 von Simon

Hi,
I put a webpage on two different servers. On one of them it works
fine:
www.fargo.pozman.pl/farmmonitor/index.php
But when I put it on www.ageng.ndsu.nodak.edu/farmmonitor/index.php=

then the links on the left side doesn't work. Does anyone has any idea
what could be a reason.
It seems that there is a problem with passing variables, but on one
server it works fine, so is it something with sever configuration?

Thanks for any help.

Here is the code of index.php:






charset=3Diso-8859-2">
Farm Monitor


leftmargin=3D"0px"; rightmargin=3D"0px"; link=3D"black"; vlink=3D"black";
alink=3D"black">

repeat-x; border: solid #ECECEC 0px; border-bottom: 0px;"
cellpadding=3D0 cellspacing=3D0>






style=3D"border-left: 0px dotted #AFAFAF; border-right: 0px dotted
#AFAFAF; border-bottom: 0px;" valign=3Dmiddle>









rules=3Dnone style=3D"border-left: 2px dotted #AFAFAF; border-right: 2px
dotted #AFAFAF; border-bottom: 2px dotted #AFAFAF;" cellpadding=3D0
cellspacing=3D0; border-top: 0px>



0px">

leftmargin=3D"0px";" cellpadding=3D0 cellspacing=3D3>







f=3D1">Temperature

Rainfall=
A>

Water
Level

Water
Content






valign=3Dtop>
center;">

if ($f==0){
include("kg.php");}
elseif ($f==1){require("1.php");

echo '
';
include("ctemperature.php");
echo '
';

include("mytemperature.php");
echo '
';
echo '
';
include("myline1.php");
include("ctempstat.php");
echo '
';
echo '
';
include("myline1week.php");
include("ctempstatweek.php");

}
elseif ($f==2){require("2.php");
echo '

';
include("ccounter.php");
include("myline3week.php");
}
elseif ($f==3){require("3.php");
include("ciswater.php");
include("myline2.php");
}
elseif ($f==4){require("4.php");
include("cwatercontent.php");
include("myline4.php");
include("cwatercontentstat.php");
}
elseif ($f==5){require("5.php");
}

?>




align=3Dcenter; border=3D0px; cellpadding=3D0; cellspacing=3D0;
bgcolor=3D"#8278FF">



class=3Dstopa>FARM MONITOR:::2007:::Szymon Woznica:::North Dakota State
University

if($gosc!=3D"1"){
$file=3Dfopen("licznik.txt", "r"); //otwieranie pliku licznika do
odczytu
flock($file, 1); //blokowanie do odczytu
$cyfra=3Dfgets($file, 100);//pobieramy z pliku cyfr=EA
flock($file, 3); //odblokowanie po odczycie
fclose($file);
$cyfra++; //dodanie punktu do licznika

$file=3Dfopen("licznik.txt", "w");//otwieranie pliku licznika do
zamazania
flock($file, 2); //blokowanie do zapisu
fwrite($file, $cyfra); //zapis stanu licznika
flock($file, 3); //odblokowanie po zapisie
fclose($file);
echo ("$cyfra");//wy=B6wietlenie cyfry na stronie
}
// je=B6li u=BFytkownik by=B3 ju=BF przed chwil=B1 na stronie wykona si=EA
instrukcja poni=BFej
else {
$file=3Dfopen("licznik.txt", "r"); //otwieranie pliku licznika do
odczytu
flock($file, 1); //blokowanie do odczytu
$cyfra=3Dfgets($file, 100);//pobieramy z pliku cyfr=EA
flock($file, 3);//odblokowanie po odczycie
fclose($file);//zamykamy plik
echo ("$cyfra");//wy=B6wietlenie cyfry na stronie
} ?> visits]





Re: Same page works differently on two different servers.

am 21.12.2007 23:41:42 von Larry Anderson

Register Globals on/off on different servers usually munges code you
had working on the other.

Re: Same page works differently on two different servers.

am 22.12.2007 08:41:46 von David Quinton

On Fri, 21 Dec 2007 14:41:42 -0800 (PST), larry@portcommodore.com
wrote:

>Register Globals on/off on different servers usually munges code you
>had working on the other.

That was what I though too.
Can be verified by a phpinfo()

But would be better to replace the:
if ($f==0){
etc
with
if ($_GET['f''==0){

rather than enable register_globals IMO
--
Locate your Mobile phone:
Great gifts: